home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 08 (1988)(MegaDisc Digital Publishing)(AU)[WB].zip / MegaDisc 08 (1988)(MegaDisc Digital Publishing)(AU)[WB].adf / ARTICLES / 1.3_System < prev    next >
Text File  |  1988-05-28  |  23KB  |  571 lines

  1.  
  2.  
  3.         What is new in Workbench 1.3
  4.         ****************************
  5.  
  6.              by James Lawrence
  7.  
  8.      [Ed: This article covers some of the new features as far as
  9.      the writer knows - however, we'll have to wait for the final
  10.      release, said to be in mid-October, until we know the whole
  11.      story.]
  12.  
  13. Workbench 1.3 has been out on gamma test release now for a few months.
  14. There are a number of significant improvements which have been made, some
  15. of which I will describe here.  Time and space and lack of information
  16. preclude a full discussion of all the changes, however I will try to at
  17. least mention all those I know of.
  18.  
  19. In this article I discuss things in the order listed below.  Not
  20. everything will be of immediate interest to everyone, so I have made
  21. headings that stand out, so you can browse more easily and read things
  22. in order of interest.
  23.  
  24. Fast Filing System (FFS)
  25. Recoverable Ram Disk
  26. NEWCON:
  27. PIPE:
  28. Preferences and new Printer Drivers and printer.device (See "Print.Manual")
  29. Shell
  30. New Commands
  31. A note about compatibility with ARP
  32.  
  33. Fast Filing System (FFS)
  34. ########################
  35.  
  36.     At a grass roots level, there is a new hard disk filing
  37. system, called the Fast Filing System.  As the name suggests, this
  38. speeds hard disk use.  Without going into too much detail, the old
  39. filing system stored 24 bytes of header info and 488 bytes of data
  40. in each block.  Because of this, the old system read data one block
  41. at a time, even though files were written in consecutive blocks
  42. wherever possible.  By storing nothing but data in the data blocks,
  43. and allocating contiguous areas of the disk (ie areas with lots of
  44. free blocks in a row, with no breaks) wherever possible, Fast
  45. Filing System can read and write large amounts of data in one go.
  46. This speeds things up considerably.  It is a little hard to say just
  47. how much it will speed up disk accesses, as this depends on the
  48. hardware and the fragmentation of the file being dealt with.  This is
  49. in contrast to the older system, where a much faster drive did not
  50. necessarily give faster operation, and access is just as slow even if
  51. the file is in one contiguous chunk of disk. I have heard reports of a
  52. 5 to 20 times increase in the speed of your typical disk access, and a
  53. 40 times increase in the speed of validating a drive.  This is because
  54. under the new system, the software can transfer data as fast as the
  55. hardware can, whereas under the old system, the software had to think
  56. and issue new commands between each block transferred, so the hardware
  57. bandwidth capability was never realised.
  58.     Note that the fast filing system applies only to hard disks at
  59. present, though 1.4 will also apply to floppy disks. Also, the hard disk
  60. must be formatted under FFS, which is a major operation for someone who
  61. already uses a hard disk.  I recommend that even if you have one of the
  62. gamma release versions, you wait for the official release.  I have heard
  63. of people having problems with the gamma FFS to the extent that they
  64. have reverted to the old system until they get a more bug free version,
  65. which the official release will be.  Hard disk problems can be a real
  66. hassle, so it is better to avoid them.
  67.  
  68. Recoverable Ram Disk
  69. ####################
  70.  
  71.     [Ed: There are a couple of versions around of the RRD, one of
  72. which actually warm boots off itself - ie, you don't need a disk in the
  73. drive, very useful. The final form of the RRD is not yet clear, however so
  74. the comments below are as a guide only.]
  75.  
  76.     Have you ever put a whole lot of stuff in RAM: and then had to
  77. reboot?  You lost it all, didn't you?  Well, now there is a device
  78. called CARD: which is similar to RAM:, but doesn't disappear when you
  79. do a warm boot (ctrl-amiga-amiga).  Before you read any further, let me
  80. warn you that it will only be useful to you if you have more than a
  81. megabyte of memory, as it is of a fixed size, not dynamic like RAM:
  82. (although you can change the size in the Mountlist, ie "highcyl").
  83. Typically, it will take up 880k.  The similarity between CARD: and RAM:
  84. is that they both reside in memory, but other than that, CARD: actually
  85. behaves more like a floppy disk.  As far as I can ascertain, the system
  86. treats CARD: as if it really is a floppy disk.  This means that you can
  87. do things like use DISKCOPY to copy the entire contents of the workbench
  88. disk onto CARD:, then run everything from there.  I do just that, in my
  89. startup-sequence (see the article elsewhere in this issue dealing with
  90. startup-sequences), and every command I issue is executed with lightning
  91. speed.  It also means I can get away quite comfortably using only one
  92. disk drive.  Before I discovered CARD:, I used to do a similar thing
  93. with RAM:.  However, because diskcopy does not work with RAM:, and I had
  94. to copy the disk file by file with every boot (ie I did a
  95.           copy df0: to ram: all quiet
  96. in my startup sequence), a boot used to take about 4 minutes.  I replaced
  97. this line with the following:
  98.  
  99. mount card:
  100. if exists card:c then
  101.     echo "card: found intact"
  102. else
  103.     diskcopy df0: to card:
  104. endif
  105.  
  106. Now a cold boot (turning the machine on) takes about 100 seconds, and a
  107. warm boot about 45 seconds, as all the stuff in CARD: is already there.
  108. As the code segment above suggests, CARD: must be mounted with each boot,
  109. but will still contain its old files after a warm boot.
  110.     There are other uses for a recoverable ram disk, such as speeding
  111. disk duplication on a single floppy system.  Doing a diskcopy (from CLI
  112. or workbench) from df0: to card:, then from card: to df0:, is faster and
  113. avoids all the disk swapping involved in a normal single drive diskcopy.
  114. With imagination, you could come up with other good uses.  For the
  115. intrepid explorer, try having a look at the CARD: entry in the file
  116. devs:mountlist.  It looks remarkably similar to a floppy disk entry.
  117. You can modify the size of the drive by varying the LOWCYL & HIGHCYL
  118. values.  Of course, to see the effect of this, CARD: has to be mounted
  119. after you modify the file.  If it is already mounted, you will have to
  120. reboot unless you know a way to dismount a device.  I certainly don't.
  121. Only one CARD: may be mounted at once, which is a bit of a pity.  The
  122. guys at the Commodore tech group tell me that you can mount one big CARD:,
  123. then put smaller partitions in it in similar style to partitioning a
  124. hard disk, but I have not had any success with this.
  125.     If you have an A1000 and kickstart 1.3 then you will even be able
  126. to warm boot from CARD:.
  127.     In case you were wondering, CARD stands for Commodore Amiga Ram
  128. Drive.
  129.  
  130. NEWCON:
  131. #######
  132.     As the name suggests, this is a new version of CON:.  It allows
  133. command line editing and keeps a command history, both done using the
  134. arrow keys. It is used by the Shell.
  135.     Left and right arrows move over the text for editing.  Shift-left
  136. and shift-right go to the ends of the line.
  137.     Up gives you the previous command, more ups get you back earlier.
  138. Down gives later commands in case you go back too far (but of course
  139. can not give you the command you were about to type.  If someone
  140. implements this feature, they will make a fortune!).  Shift-up finds
  141. the latest command which starts with a partly typed string.  Shift-down
  142. takes you straight to the bottom of the history buffer.  Once you have
  143. found the desired command in the history, you may edit it using left
  144. & right arrow keys, then hit return.
  145.     In other respects, NEWCON: resembles CON:, except that it must
  146. be mounted before use.  This would normally be done in the startup-sequence.
  147.  
  148. PIPE:
  149. #####
  150.     Unix buffs will be familiar with the concept of a pipe.  The idea
  151. is that the output of one program can be redirected into the input of
  152. another, in a similar way that output can be redirected to a file.  The
  153. method used is, however, slightly different from unix.  One very typical
  154. use of a pipe is to use MORE (the text-displaying utility) to slow down the
  155. output of a program so it can be read.  A typical example would be:
  156.  
  157. mount pipe:
  158.  
  159. (this only need be done once per boot.  It could be in the
  160. startup-sequence.)  Then, in one CLI:
  161.  
  162. dir > pipe:a df0: opt a
  163.  
  164. then in another CLI:
  165.  
  166. more pipe:a
  167.  
  168. The pipe can be considered as being like a file which can be written to
  169. by one program and read from by another simultaneously.  As many pipes
  170. as needed can be invoked simultaneously by using a different name, for
  171. example pipe:b.  In this way, many commands can be strung together with
  172. pipes between them.  It is possible to write to a pipe from an
  173. application program (wordprocessor, etc) simply by specifying a pipe as
  174. the name of the file to write.  Similarly, a pipe can be read in the
  175. same way.
  176.     The way the pipe works (roughly) is that one program
  177. writes into a buffer, which the other program reads from.  No permanent
  178. storage is done.  The maximum size of the buffer is 4k, so if the
  179. writing program tries to write more than 4k past where the reading
  180. program is up to, then it is stopped until the reading program has read
  181. some more.
  182.  
  183.  
  184. Preferences and new Printer Drivers and printer.device
  185. ######################################################
  186.  
  187.  
  188.     Most of the changes to preferences relate to printers.  There
  189. are now two printer graphic screens.  These allow you to control density,
  190. horizontal centering, scaling, colour correction (to make the printer
  191. output look  like the screen), left offset, dithering (making new colours
  192. by putting different coloured pixels next to each other),size,
  193. antialiasing (smoothing diagonal lines), and a couple of more esoteric
  194. things.
  195.  
  196.     There are a whole swag of new and rewritten printer drivers.
  197. Notable amongst them is the EpsonQ 24 pin driver, which allows printing
  198. at densities of 90, 120, 180, and 360 dpi.
  199.  
  200.     Have a look at the article "Print.Manual" on this disk for the
  201. full story about printing with the Amiga and 1.3.
  202.  
  203. Shell
  204. #####
  205.  
  206.     This replaces the CLI.  There have been several enhancements,
  207. including resident commands, aliasing, putting the current directory
  208. into the prompt, and shell scripts.
  209.     A resident command is one which is in memory permanently, so
  210. it does not need to be loaded each time it is called.  It could be
  211. run several times simultaneously, with all invocations using the same
  212. piece of code in memory.  This is described further in the next section.
  213.     Aliasing allows you to type one thing when you really mean
  214. something completely different, but still have your Amiga understand
  215. what you are saying.  It works like this: Imagine for a moment that
  216. you have a directory called sys:fred/john/mary/englebert/yet_another_one
  217. which you often want to CD to.  You could set up an alias like
  218.  
  219. alias yao cd sys:fred/john/mary/englebert/yet_another_one
  220.  
  221. Then typing
  222.  
  223. yao
  224.  
  225. would be equivalent to typing
  226.  
  227. cd sys:fred/john/mary/englebert/yet_another_one
  228.  
  229. If you need to have a variable part in the alias, then enlose it in []
  230. eg
  231.  
  232. alias xcopy copy [] clone
  233.  
  234. then typing
  235.  
  236. xcopy fred john
  237.  
  238. would be equivalent to
  239.  
  240. copy fred john clone
  241.  
  242. Typing
  243.  
  244. alias yao
  245.  
  246. removes the definition for yao.
  247.  
  248. Typing alias by itself lists the current aliases.
  249.  
  250. 1>alias
  251. xcopy   copy [] clone
  252. newshell    newcli newcon:0/0/640/256/AmigaShell
  253.  
  254. By the way, those two are standard.
  255.     Each shell will maintain its own independent set of aliases.
  256. It would be a good idea to set the ones you will use often in the
  257. s:CLI-startup file, which is a sequence which gets executed every time
  258. a CLI (shell) is invoked.
  259.  
  260.     The PROMPT command has been enhanced for use with the shell.
  261. The format is
  262.  
  263. PROMPT <string>
  264.  
  265. where <string> is the prompt desired, surrounded by quotes.  Within
  266. the string, %N gives the CLI number, and %S gives the current directory.
  267. For example,
  268.  
  269. prompt "%N.%S > "
  270.  
  271. would give a prompt which might look like
  272.  
  273. 3.SYS:fred/john/mary/englebert/yet_another_one>
  274.  
  275. (there is a space after the >) This is the default setting.
  276.  
  277.     It is no longer necessary to use the EXECUTE command explicitly.
  278. Instead, use PROTECT to set the script bit of the protection field.
  279. For example, if we say
  280.  
  281. protect scriptfile +s
  282.  
  283. where scriptfile is some file containing CLI commands (a sequence),
  284. then at any time in the future,
  285.  
  286. scriptfile
  287.  
  288. is equivalent to
  289.  
  290. execute scriptfile
  291.  
  292. If you put the S: directory in the path, then things get even easier,
  293. as you can create scripts, store them in S:, then treat them just
  294. like any other command.
  295.     This feature still uses EXECUTE, so to make it really fly,
  296. you could make EXECUTE resident as described below.
  297.  
  298.  
  299. New Commands
  300. ############
  301.  
  302. ASK     Provides interactive execution control in the CLI.  This is
  303.     only really useful in sequence files.  As an example, the
  304.     following code segment in a sequence file:
  305.  
  306.     ask "Are you ready for this?"
  307.     if warn then
  308.         echo "OK, lets get under way!"
  309.     else
  310.         endcli
  311.     end if
  312.  
  313.     will ask the user the question.  If the answer is y or yes
  314.     (in upper or lower case), then ASK sets a return code of 5
  315.     (warn), and the echo is done.  Any other response will
  316.     cause the ELSE section to be executed (in this example this
  317.     terminates the sequence).  [Ed: check SWITCH in the PROGRAMS
  318.     drawer for a mouse-driven ASK.]
  319.  
  320. AVAIL   Gives memory usage & availability statistics.
  321.  
  322.     1> avail
  323.     Type  Available    In-Use   Maximum   Largest
  324.     chip     366272    156960    523232    362416
  325.     fast    1452656   1161352   2614008    954472
  326.     total   1818928   1318312   3137240    954472
  327.  
  328. FF      stands for FastFonts.  Generally run in the startup-sequence.
  329.  
  330. GETENV & SETENV Return or set the value of an environment variable.
  331.     A couple of examples:
  332.  
  333.     1> setenv number 25
  334.     1> getenv number
  335.     25
  336.     1> setenv fred_nurk "silly person"
  337.     1> getenv fred_nurk
  338.     silly person
  339.     1> getenv number
  340.     25
  341.  
  342.     where lines starting with a prompt ( ie 1> ) are input, and
  343.     others are output.
  344.  
  345.     SETENV with only one argument removes that variable.
  346.     Continuing from the above example:
  347.  
  348.     1> setenv number
  349.     1> getenv number
  350.  
  351.     (nothing is returned)  These commands are designed to use
  352.     the ENV: device promised for V1.3.  In the author's gamma
  353.     version, they use a directory in RAM: which has been ASSIGNed
  354.     the name ENV:.
  355.  
  356. LOCK    Sets and resets the write protect of a hard disk or partition
  357.     using fastfilesystem.  If you type
  358.  
  359.     LOCK "dh0,on,xxxx"
  360.  
  361.     where xxxx is an optional four letter password, then the drive
  362.     will be write protected until you type
  363.  
  364.     LOCK "dh0:,off,xxxx"
  365.  
  366.     where xxxx is the same password (or absence of one), or until
  367.     you reboot.
  368.  
  369.     You may need an extra comma after the 'on' and before
  370.     the 'off'.
  371.  
  372. RESIDENT    Allows often used commands to be loaded permanently
  373.     into memory, so subsequent calls just execute that bit of
  374.     memory.  More than one occurrence of the program may then
  375.     use the same piece of code, which is just to say that if we
  376.     made a command resident, and used it in two shells
  377.     simultaneously, then both would actually run from the same
  378.     code segment in the same memory.  This saves both time and
  379.     memory space.  In another way, it wastes memory, as all
  380.     resident commands are permanently in memory regardless of
  381.     whether they are currently being used.  This feature can only
  382.     be used with the shell described above, it does not work with
  383.     the old CLI.  Also, to be able to be made resident, a piece
  384.     of code must be both re-entrant and re-executeable, which
  385.     essentially means that it must be pure code - code which uses
  386.     no variables buried in the code (it may use the stack, or other
  387.     schemes for keeping variables independent of code).  This does
  388.     limit the programs available.  A pure code segment should have
  389.     the PURE bit set in the protection field (>protect name +p).
  390.     It is possible to test code for purity by using resident with
  391.     the PURE flag.  This would be done as follows:
  392.  
  393.     resident "name,file,add,pure"
  394.  
  395.     where name is what you want the command to be called, and file
  396.     is the full pathname where it can be found.
  397.     Then run the command simultaneously in two separate shells.  If
  398.     all is well, then the code is pure.  If a guru happens, the code
  399.     is impure.  If the code is pure, you can set the PURE bit:
  400.  
  401.     protect name +p
  402.  
  403.     The full specification of the command is
  404.  
  405.     resident "name,file,action,pure"
  406.  
  407.     where name and file are as described above, action is one of
  408.     add, delete, replace, and the pure is optional (not needed if
  409.     pure bit of file's protection field is set).  If no name is
  410.     specified, then it defaults to the filename part of the full
  411.     pathname.
  412.  
  413.     Normally you would set up all the resident commands in the
  414.     startup-sequence.  See the article on startup sequences elsewhere
  415.     in this issue.
  416.  
  417.     resident called with no arguments lists the resident list:
  418.  
  419.     1> resident
  420.  
  421.     Name         UseCount
  422.     Execute         1
  423.     CLI           SYSTEM
  424.     FileHandler       SYSTEM
  425.     Restart       SYSTEM
  426.     CLI           SYSTEM
  427.  
  428. SETALERT    A mystery command.  Possibly it helps to avoid gurus
  429.     - but I can assure you it does not prevent them!  In any case,
  430.     this gets run during the startup sequence, and never goes away.
  431.  
  432. XICON   Runs a script file (a sequence) from the workbench.  To use
  433.     this, create an icon for the file, and set the default tool to
  434.     c:Xicon by using the workbench INFO menu item.  You may also
  435.     set a WINDOW= specification (take a look at the SHELL (or CLI)
  436.     icon for an example) to set the size & location of the window
  437.     needed for input and output for the script.  You may also set a
  438.     DELAY= to delay the demise of the window after the script is
  439.     finished.
  440.     [Ed: Pete Goodeve tells me that Xicon is not working in the gamma
  441.     release version of 1.3, and it certainly isn't his program - it's
  442.     been rewritten and is smaller.]
  443.  
  444. The following additions have been made to the SYSTEM directory:
  445.  
  446. FASTMEMFIRST    This organises the free memory list so that fast
  447.     gets used first.  This saves chip memory for things that
  448.     must use it - such as the chips (surprise surprise) and a few
  449.     older programs.
  450.  
  451. FIXFONTS    ???
  452.  
  453. The following additions have been made to the UTILITIES directory:
  454.  
  455. CALCULATOR      A four function calculator driven by mouse or keyboard.
  456.  
  457. CLOCKPTR    Turns the workbench pointer into a digital clock
  458.     whenever the Workbench is selected.  This shows the time in
  459.     24 hour format.  If the pointer is against the left edge of
  460.     the screen, the date is displayed.  If it is in the top left
  461.     corner, then minutes and seconds are shown instead of hours
  462.     and minutes.
  463.  
  464.     This can be run from either CLI or workbench - the icon is
  465.     in the utilities folder.
  466.  
  467.     Successive invocations of CLOCKPTR toggle between the clock
  468.     and the default pointer.  Alternatively, if you ran it from
  469.     the CLI, you can stop it with ctrl-c or with the break command.
  470.  
  471. CMD     Redirects serial or parallel port output to a file.  This is
  472.     useful if, like me, you do not own a printer.  You can use a
  473.     print command in a word processor (or any application) and
  474.     save the output on disk.  Then off you go to your friend's
  475.     place to use his printer.  If you have a 5.25 inch drive and
  476.     the appropriate driver, you could save the file on an MS-DOS
  477.     disk and print it using one of those machines (perhaps take
  478.     your disk to work and use the laser printer ...).  CMD also
  479.     makes it possible to inspect and edit printer or modem
  480.     before it is sent to the device in question.
  481.  
  482.     The format is
  483.     CMD -s -m -n <devicename> <filename>
  484.     The -s, -m, and -n are optional.
  485.     -s skips any short initial write (usually a reset)
  486.     -m captures multiple files until ctrl-c or a break
  487.     -n gives progress messages (NOTIFY)
  488.  
  489.     CMD can also be used from the workbench.  To set the options,
  490.     use the workbench menu item INFO and set the tool types.
  491.     The default settings for these are:
  492.     DEVICE=parallel
  493.     FILE=ram:CMD_file
  494.     SKIP=FALSE
  495.     MULTIPLE=FALSE
  496.     NOTIFY=FALSE
  497.  
  498. MORE    Like a nice version of TYPE.  Allows you to read files a page
  499.     at a time, search for strings, etc.  For a list of commands,
  500.     type the letter h to the more prompt.  The format is simply
  501.     MORE filename
  502.  
  503.     MORE can be run from the workbench by selecting the file
  504.     (click on it), then holding the shift key while you double
  505.     click on MORE.
  506.  
  507. SAY     Pretty much like the current one.
  508.  
  509. Many of the existing commands have slightly changed specifications,
  510. too many to list here.  I can only suggest that you wait for official
  511. documentation, or if you are playing with the system, then you can at
  512. least find the templates by typing command ?
  513. For example, consider the humble COPY command:
  514.  
  515. 1>copy ?
  516. FROM,TO/A,ALL/S,QUIET/S,BUF=BUFFER/K,CLONE/S,DATE/S,NOPRO/S,COM/S:
  517.  
  518. The BUF= option sets the number of 512 byte buffers used by COPY.
  519. DATE, NOPRO, and COM allow the initial date, protection and
  520. comment respectively to be reproduced.  CLONE does all three in
  521. one hit.
  522. Experiment with your favourite commands and see if they have changed!
  523.  
  524. A note about compatibility with ARP
  525. ###################################
  526.  
  527. [Ed: See review this issue and on previous issues.]
  528.  
  529.     The Amiga Replacement Project (ARP) is a set of Amigados
  530. commands written  by a third party wth the following properties:
  531.   they are compatible with WB1.2
  532.   they are written in assembler, which makes them faster and smaller
  533. than their Commodore V1.2 commands written in C
  534.   they have a more consistent set of options
  535.   a few other improvements over V1.2
  536.  
  537.     Commodore's V1.3 commands are also
  538.   compatible with WB1.2
  539.   written in assembler
  540.   have a more consistent set of options
  541.   have a significant number of improvements over V1.2
  542. In addition, many of the V1.3 commands have features which are V1.3
  543. specific.  For example, PROTECT now gives access to the pure, script,
  544. hidden and archive flags.  The pure and script flags are relevant
  545. only to resident commands and directly executeable shellscripts
  546. respectively, which are features of the new shell.  What the hidden
  547. flag does is anybody's guess.  More importantly, the V1.3 commands
  548. were written specifically to be pure code, so they can be made
  549. resident.  I do not know whether the ARP people had this in mind
  550. when they wrote their commands, so ARP may or may not be pure.
  551. One way to find out would be to use the PURE option to RESIDENT, as
  552. described above.  In any case, it would not be sensible to simply
  553. replace all the V1.3 commands without the ARP ones.  Each command
  554. would have to be looked at on its own merit, and I strongly suspect
  555. that the performance gain available is very limited, and not worth
  556. the effort.  This is in contrast to V1.2, where ARP is definitely
  557. an improvement.  Mind you I have not looked at ARP in depth, so I
  558. could be completely wrong ... .
  559.  
  560.  
  561. If you have learned half as much by reading this article as I have
  562. by writing it, then you are well on your way to being able to
  563. utilise the full potential of your Amiga under WB1.3.
  564.  
  565. Happy hacking,
  566. James.
  567.  
  568. XXXXXXXXXXXXXXXXXXXXXXXXX END OF 1.3_SYSTEM XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  569.  
  570.  
  571.